package com.yuyou.hxyy.service.api.service;

import com.yuyou.hxyy.service.api.bean.Pagination;
import com.yuyou.hxyy.service.api.entity.DataImport;
import com.yuyou.hxyy.service.api.entity.WordUnit;
import com.yuyou.hxyy.service.api.vo.req.WordUnitExcel;
import com.yuyou.hxyy.service.api.vo.resp.WordUnitStatisticsVo;
import com.yuyou.hxyy.service.api.vo.resp.WordUnitVo;
import org.apache.poi.xssf.usermodel.XSSFWorkbook;

import java.util.List;
import java.util.Map;

public interface IWordUnitService {
    int deleteByPrimaryKey(Long WordUnit);

    int insert(WordUnit record);

    void insertWordUnit(String name , Long wordRepoId , Integer category , Long userId , Integer sort);

    void updateWordUnit(String name , Long id ,  Long userId , Integer sort);

    WordUnit selectByPrimaryKey(Long WordUnit);

    int updateByPrimaryKeySelective(WordUnit record);

    void deleteByIds(String ids);

    int findWordUnitCount(Pagination<WordUnitVo> queryPgn);

    List<WordUnitVo> findWordUnitPage(Pagination<WordUnitVo> queryPgn);

    List<WordUnitVo> findAllWordUnit(Map<String , Object> condition);

    WordUnit findByNameRepo(Long repoId , String name);

    DataImport saveWordUnitImport(List<WordUnitExcel> wordUnitExcelList);


    List<WordUnitStatisticsVo> getUnitList(Long repoId , Long userId);

    void passUnit(Long wordRepoId , Long wordUnitId, Long userId);

    XSSFWorkbook failedInfoOfWordUnitImport(List<WordUnitExcel> wordUnitExcelList);

    WordUnitStatisticsVo getStuNextUnitId(Long unitId , Long userId);
}
